<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="container" style="width:800px;height:600px;border:1px solid grey"></div>

    <script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.34.1/min/vs/loader.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/monaco-editor-ex@latest/dist/monaco-editor-ex.iife.js"></script>
    <script>
        require.config({ paths: { vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.34.1/min/vs' } });
        require(['vs/editor/editor.main'], function () {
            MonacoEditorEx.initMonaco(monaco);
            var editor = monaco.editor.create(document.getElementById('container'), {
                value: `
<div>
    
<div>
<script>
    
</${'script'}>
                `,
                language: 'html'
            });
        });
    </script>
</body>

</html>